<template>
	<custom-layout custom-class="custom-layout">
			<wd-card  custom-class="card">
				<view class="withdra-success">
					<image src="/static/image/my-withdrawal/sucess.png" mode="aspectFit" class="withdra-success-img"></image>
					<view class="withdra-success-text">
						提现申请提交成功
					</view>
					<view class="withdra-success-tip">
						提现后24小时内到账，若未及时到账请联系客服人员
					</view>
				</view>
				
				<view class="withdrawal-content">
					<view class="item">
						<view class="item-title">
							收款账户
						</view>
						<view class="item-content">
							<image src="/static/image/my-withdrawal/vx.png" mode="aspectFit" class="select-img"></image>
							<text>微信零钱</text>
						</view>
					</view>
					<view class="item">
						<view class="item-title">
							提现金额
						</view>
						<view class="item-content">
							{{inputMoney}}元
						</view>
					</view>
				</view>
			</wd-card>
			<!-- 返回 -->
			<wd-button block size="large" :round="false" custom-class="submit-button" @click="handleBack">返回</wd-button>
		
	</custom-layout>
</template>

<script setup>
	import {
		ref,
		watch
	} from 'vue'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	import {
		initiateWithdraw
	} from '@/api/withdrawal/index.js'
	import {
		useDictionaryStore,
		useUserStore
	} from '@/store/index.js'
	import dayjs from 'dayjs'

	// 字典仓库
	const dictionaryStore = useDictionaryStore()
	// 用户仓库
	const userStore = useUserStore()
	// 可提现金额
	const withdrawalMoney = ref()
	withdrawalMoney.value = userStore.userInfo?.commissionUserRespVO?.notWithdrawnMoeny || 0
	
	// 输入金额
	const inputMoney = ref()
	const handleBack = () => {
		uni.navigateBack()
	}
	onLoad((option)=>{
		inputMoney.value = option.inputMoney
			
	})

</script>

<style lang="scss" scoped>
	// 自定义布局
	:deep(.custom-layout) {
		background: #F8F8F8;
	}
	:deep(.card) {
		margin-top: 10rpx;
	}
	.withdra-success {
		display: flex;
		flex-direction: column;
		// justify-content: center;
		align-items: center;
		margin-bottom: 30px;
		padding-bottom: 20px;
		border-bottom: 1px dashed #f3f3f3;
		.withdra-success-img {
			width: 160rpx;
			height: 160rpx;
			margin-bottom: 20px;
		}
		.withdra-success-text {
			font-size: 36rpx;
			font-weight: bold;
			color: #333;
		}
		.withdra-success-tip {
			color: #8a8a8a;
			padding: 20px 40px;
		}
	}
	.item {
		display: flex;
		justify-content: space-between;
		margin-top: 10px;
		.item-title {
			color: #333;
		}
		.item-content {
			color: #8a8a8a;
			display: flex;
			align-items: center;
			.select-img {
				width: 30rpx;
				height: 30rpx;
				margin-right: 8rpx;
			}
		}
	}
	:deep(.submit-button) {
		margin: 30px 15px;
	}
	
</style>